package com.baikeyang.service.activity;

import com.baikeyang.common.bean.ResponseResult;
import com.baikeyang.common.bean.activity.SimpleActivityInfo;
import com.baikeyang.common.bean.activity.SimpleActivityUser;
import com.baikeyang.common.model.*;
import com.baikeyang.service.base.ISuperService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author BaiKeyang
 * @since 2020-05-20
 */
public interface IActivityInfoService extends ISuperService<ActivityInfo> {

    /**
     * 保存活动信息
     * @param activityInfo
     * @return
     */
    ResponseResult saveActivityInfo(ActivityInfo activityInfo);

    /**
     * 更新活动信息
     * @param activityInfo
     * @return
     */
    ResponseResult updateActivityInfo(ActivityInfo activityInfo);

    /**
     * 分页获取活动列表
     * @param pageParam
     * @return
     */
    IPage<SimpleActivityInfo> getSimpleActivityInfoPage(Page<ActivityInfo> pageParam);

    /**
     * 获取活动详情
     * @param id
     * @return
     */
    ResponseResult getActivityInfoById(String id);

    /**
     * 加入活动
     * @param activityUserJoin
     * @return
     */
    ResponseResult joinActivityByUserId(ActivityUserJoin activityUserJoin);

    /**
     * 收藏活动
     * @param activityUserFav
     * @return
     */
    ResponseResult favActivityByUserId(ActivityUserFav activityUserFav);

    /**
     * 关注好友
     * @param activityUserCare
     * @return
     */
    ResponseResult careActivityByUserId(ActivityUserCare activityUserCare);

    /**
     * 用户参加活动
     * @param pageParam
     * @return
     */
    IPage<SimpleActivityInfo> getActivityUserJoins(Page<SimpleActivityInfo> pageParam, Long userId);

    /**
     * 获取用户收藏活动
     * @param pageParam
     * @return
     */
    IPage<SimpleActivityInfo> getActivityUserFavs(Page<SimpleActivityInfo> pageParam, Long userId);

    /**
     * 获取用户关注的人
     * @param pageParam
     * @return
     */
    IPage<SimpleActivityUser> getActivityUserCares(Page<SimpleActivityUser> pageParam, Long userId);

    /**
     * 验证用户是否加入当前活动
     * @param userId
     * @param activityId
     * @return
     */
    ResponseResult checkActivityUserJoin(Long userId, Long activityId);

    /**
     * 验证用户是否收藏当前活动
     * @param userId
     * @param activityId
     * @return
     */
    ResponseResult checkActivityUserFav(Long userId, Long activityId);

    /**
     * 验证用户是否关注了当前用户
     * @param userId
     * @param careUserId
     * @return
     */
    ResponseResult checkActivityUserCare(Long userId, Long careUserId);

    /**
     * 取消参加活动
     * @param userId
     * @param activityId
     * @return
     */
    ResponseResult removeJoinActivityByUserId(String userId, Long activityId);

    /**
     * 取消活动收藏
     * @param userId
     * @param activityId
     * @return
     */
    ResponseResult removeFavActivityByUserId(String userId, Long activityId);

    /**
     * 取消用户关注
     * @param userId
     * @param careUserId
     * @return
     */
    ResponseResult removeCareActivityByUserId(String userId, Long careUserId);

}
